<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ListMatchs.ascx.cs" Inherits="TVT.UI.UserControls.ListMatchs" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
 <asp:UpdatePanel ID="upListMatchs" runat="server" UpdateMode="Conditional">
    <ContentTemplate > 
         <table style="text-align:left" width="100%" cellpadding="0" cellspacing="0">
            <tr>
                <td class="style2" style="background-image:url(App_Themes/NewDesign/Images/barra-pix.gif);">
                    <img id="imgPoints" src="App_Themes/NewDesign/Images/tild-tit.gif" style="vertical-align:middle"/>
                    <font class="titleText">Matchs</font>
                </td>
                <td class="style2" align="right"  style="background-image:url(App_Themes/NewDesign/Images/barra-pix.gif);">    
                    <asp:LinkButton ID="lnkBtnCollapseExpand" runat="server"><asp:Image ID="imgCollapseExpand" ImageUrl="~/App_Themes/NewDesign/Images/_icon.gif" runat="server" style="padding-right:10px;vertical-align:middle;" /></asp:LinkButton>
                </td>
            </tr>
        </table>                                  
        <asp:Panel CssClass="contentMargins"  ID="pnlSearchMatchsResults" runat="server"  Width="95%" style="text-align:left;" Visible="false">                      
         <table cellspacing="0px" cellpadding="0px" style="text-align:left;" width="870px" >
            <tr>
                <td align="left">
                    <asp:Label ID="lblTransactionResultMessage" runat="server" Visible="false" CssClass="transactionResultMessage"></asp:Label>
                </td>
            </tr>
            <tr>
                <td align="left">
                    <asp:GridView BorderStyle="none" ShowFooter="true" ShowHeader="true" ID="gvMatchs" runat="server" autogeneratecolumns="False" 
                            OnSorting="OnSortingGvMatchs" DataKeyNames="UserId" style="text-align:left;" HeaderStyle-HorizontalAlign="Center" Width="80%" OnPageIndexChanging="gvMatchs_PageIndexChanging" OnRowCommand="gvMatchs_RowCommand" OnRowDataBound="gvMatchs_RowDataBound" allowpaging="True" allowsorting="True">  
                        <HeaderStyle Height="30px" BackColor="#5a99e0" ForeColor="white" BorderWidth="0px"/>
                        <columns>                                                    
                            <asp:boundfield datafield="UserId" sortexpression="UserId" Visible="False"  /> 
                            <asp:TemplateField HeaderStyle-CssClass="gridHeader" SortExpression="Picture" HeaderStyle-HorizontalAlign="left"  HeaderStyle-BorderWidth="1px" HeaderStyle-BorderColor="#5a99e0"   HeaderText="Picture" ItemStyle-Height="20px">
                                <ItemTemplate >                                      
                                        <table width="140px" cellpadding="0px" cellspacing="0px" style="height:100px">
                                          <tr>
                                            <td class="cellMatchStyle" style="padding-left:2px;text-align:center;padding-right:2px;" >
                                                <asp:Image ID="imgUser" runat="server" Height="94" Style="width:auto" ImageUrl="~/App_Themes/NewDesign/UsersImages/NoPictureAvailableImage.jpg"/>
                                            </td>
                                          </tr>
                                       </table> 
                                </ItemTemplate>                                               
                             </asp:TemplateField> 
                             <asp:TemplateField HeaderStyle-CssClass="gridHeader" SortExpression="UserName" HeaderStyle-HorizontalAlign="left"  HeaderStyle-BorderWidth="1px" HeaderStyle-BorderColor="#5a99e0"   HeaderText="UserName" ItemStyle-BorderWidth="0px" FooterStyle-BorderWidth="0px" ItemStyle-Height="20px">
                                <ItemTemplate > 
                                     <table width="120px" cellpadding="0px" cellspacing="0px" style="height:100px">    
                                         <tr> 
                                               <td class="cellMatchStyle" style="text-align:center" >
                                                    <asp:Label runat="server" id="lblUserName" />
                                               </td>
                                         </tr>
                                       </table> 
                                </ItemTemplate>                                               
                             </asp:TemplateField> 
                             <asp:TemplateField HeaderStyle-CssClass="gridHeader" SortExpression="Age" HeaderStyle-HorizontalAlign="left"  HeaderStyle-BorderWidth="1px" HeaderStyle-BorderColor="#5a99e0" HeaderText="Age" ItemStyle-BorderWidth="0px" FooterStyle-BorderWidth="0px" ItemStyle-Height="20px">
                                <ItemTemplate > 
                                     <table width="140px" cellpadding="0px" cellspacing="0px" style="height:100px">    
                                         <tr> 
                                               <td class="cellMatchStyle" style="text-align:center" >
                                                    <asp:Label runat="server" id="lblAge"/>                                        
                                               </td>
                                         </tr>
                                       </table> 
                                </ItemTemplate>                                               
                             </asp:TemplateField>
                             <asp:TemplateField HeaderStyle-CssClass="gridHeader" SortExpression="MatchLevel" HeaderStyle-HorizontalAlign="left"  HeaderStyle-BorderWidth="1px" HeaderStyle-BorderColor="#5a99e0"   HeaderText="Match Level" ItemStyle-BorderWidth="0px" FooterStyle-BorderWidth="0px" ItemStyle-Height="20px">
                                <ItemTemplate> 
                                     <table width="160px" cellpadding="0px" cellspacing="0px" style="height:100px">    
                                         <tr>
                                             <td class="cellMatchStyle" style="text-align:center" >
                                                    <asp:Label runat="server" id="lblMatchLevel"/>                                        
                                             </td>                                              
                                          </tr>
                                       </table> 
                                 </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Options" HeaderStyle-Width="100px" FooterStyle-BorderWidth="0px" ItemStyle-Height="20px" HeaderStyle-CssClass="gridHeader">
                            <ItemTemplate> 
                                    <table width="122px" cellpadding="0px" cellspacing="0px" style="height:100px; text-align:center">
                                          <tr>
                                            <td class="cellMatchStyle" style="width:60px;text-align:center" >
                                                <asp:ImageButton ImageUrl="~/App_Themes/NewDesign/Images/Edit-icon.gif" ID="lbtnContact" runat="server" Text="Contact" CommandName="ContactUser" style="vertical-align:middle;"/>                                        
                                            </td>
                                            <td style="width:2px">
                                               <%--ItemSeparator--%>
                                            </td>
                                            <td class="cellMatchStyle" style="width:60px;text-align:center">
                                                <asp:ImageButton ImageUrl="~/App_Themes/NewDesign/Images/delete-icon.gif" ID="lbtnDiscard" runat="server" Text="Discard" CommandName="DiscardUser" style="vertical-align:middle"></asp:ImageButton>
                                                <ajaxToolkit:ConfirmButtonExtender ID="cbe" runat="server" TargetControlID="lbtnDiscard" ConfirmText="Are you sure you want to discard this match?"/>
                                            </td>
                                         </tr>
                                     </table>                                                                
                            </ItemTemplate>
                             <FooterTemplate>
                                <table width="122px" cellpadding="0px" cellspacing="0px" style="height:25px;text-align:center">
                                    <tr>
                                        <td style="width:60px;" class="OptionStyle">
                                            <asp:Label id="lblContact" runat="server"  Text="Contact" CssClass="OptionText"></asp:Label>
                                        </td>
                                        <td style="width:2px">
                                               <%--ItemSeparator--%>
                                            </td>
                                        <td style="width:60px;" class="OptionStyle">
                                            <asp:Label id="lblDiscard" runat="server" Text="Discard" CssClass="OptionText"></asp:Label>
                                        </td>
                                    </tr>
                                </table>
                            </FooterTemplate>                              
                            </asp:TemplateField>                                
                       </columns>                           
                    </asp:GridView>
                </td>
            </tr> 
         </table>
    </asp:Panel>
             <ajaxToolkit:CollapsiblePanelExtender ID="CollapsibleListMatchs" runat="server" 
            TargetControlID="pnlSearchMatchsResults"
            CollapsedSize="0"
            Collapsed="False"
            ExpandControlID="lnkBtnCollapseExpand"
            CollapseControlID="lnkBtnCollapseExpand"
            AutoCollapse="False"
            AutoExpand="False"
            ImageControlID="imgCollapseExpand"
            ExpandedImage="~/App_Themes/NewDesign/Images/_icon.gif"
            CollapsedImage="~/App_Themes/NewDesign/Images/+icon.gif"
            ExpandDirection="Vertical" />
    </ContentTemplate>
</asp:UpdatePanel>

           